package com.xyw.code.study202007292;

import com.taobao.api.ApiException;
import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.TbkTpwdCreateRequest;
import com.taobao.api.response.TbkTpwdCreateResponse;

/**
 * Created with IntelliJ IDEA.
 * User: xuyiwei
 * Date: 2020/8/5
 * Time: 上午7:58
 * Email: 1328312923@qq.com
 * Description: No Description
 **/
public class bbb {
    public static void main(String[] args) throws ApiException {
        TaobaoClient client = new DefaultTaobaoClient("http://gw.api.taobao.com/router/rest",
                "30949218", "4ce31c58f2b5f5db98b5f4e4420f2d77");
        TbkTpwdCreateRequest req = new TbkTpwdCreateRequest();
        req.setUserId("123");
        req.setText("长度大于5个字符");
        req.setUrl("https://uland.taobao.com/coupon/edetail?e=z1XjsvU%2FIVkNfLV8niU3RxrSI%2FOabn6qNg4Gqf8CT4AKuDLwELihnTeYX4xyZeTP%2B6HGijc6WfXvbt3BoNZSaHo4VDdW9T64usBo1hjqM4FmMGWoSLQgAjT0Te79hGlEvr52PQ026SMI%2BYnaTrOIv6h7H2zZZZhIkFTJDXXmgFNgG%2F3bAHW2BfezkI4v0i6J09n1P0j5XaIJP8D1%2BglCLSUzVkkdwsIm&&app_pvid=59590_11.88.161.10_651_1596585364140&ptl=floorId:2836;app_pvid:59590_11.88.161.10_651_1596585364140;tpp_pvid:100_11.14.209.40_7065_6591596585364146543&xId=1uDujEpvXZBxpvXYwZYEN9DdEYxko36BM5stdBZ8j6gtkzqYrQkbam1W9nJHAjYNDHdnR1fieSETtwS2U9yKItS1YWyagpiG4tYkXeQqqyaP&union_lens=lensId%3AMAPI%401596585364%400b58a10a_1872_173bbe74afe_8a73%4001");
        req.setLogo("https://uland.taobao.com/coupon/edetail?e=z1XjsvU%2FIVkNfLV8niU3RxrSI%2FOabn6qNg4Gqf8CT4AKuDLwELihnTeYX4xyZeTP%2B6HGijc6WfXvbt3BoNZSaHo4VDdW9T64usBo1hjqM4FmMGWoSLQgAjT0Te79hGlEvr52PQ026SMI%2BYnaTrOIv6h7H2zZZZhIkFTJDXXmgFNgG%2F3bAHW2BfezkI4v0i6J09n1P0j5XaIJP8D1%2BglCLSUzVkkdwsIm&&app_pvid=59590_11.88.161.10_651_1596585364140&ptl=floorId:2836;app_pvid:59590_11.88.161.10_651_1596585364140;tpp_pvid:100_11.14.209.40_7065_6591596585364146543&xId=1uDujEpvXZBxpvXYwZYEN9DdEYxko36BM5stdBZ8j6gtkzqYrQkbam1W9nJHAjYNDHdnR1fieSETtwS2U9yKItS1YWyagpiG4tYkXeQqqyaP&union_lens=lensId%3AMAPI%401596585364%400b58a10a_1872_173bbe74afe_8a73%4001");
        req.setExt("{}");
        TbkTpwdCreateResponse rsp = client.execute(req);
        System.out.println(rsp.getBody());
    }
}
